package play.modules.m4fcity;

import play.Logger;
import play.PlayPlugin;
import play.exceptions.UnexpectedException;
import play.mvc.Router;

/**
 * The Class M4FCityPlugin.
 * 
 * @author David Basoko (david.basoko@m4f.es)
 * @copyright m4f (http://m4f.es)
 */
public class M4FCityPlugin extends PlayPlugin {
	
	/**
     * Load
     * 
     * @see play.PlayPlugin#onLoad()()
     */
    @Override
    public void onLoad() {
    	Logger.info("M4FCityPlugin.onLoad()");
    }
	
	/**
     * Start
     * 
     * @see play.PlayPlugin#onApplicationStart()
     */
    @Override
    public void onApplicationStart() {
    	Logger.info("M4FCityPlugin.onApplicationStart");
    }
    
    /**
     * Routes
     * 
     * @see play.PlayPlugin#onRoutesLoaded()
     */
    @Override
    public void onRoutesLoaded() {
		Logger.info("M4FCityPlugin.onRoutesLoaded");
        Router.addRoute("GET", "/m4fcity/login", "M4FCityController.login");
        Router.addRoute("GET", "/m4fcity/logout", "M4FCityController.logout");
        Router.addRoute("GET", "/m4fcity/oauth/callback", "M4FCityController.callback");
    }
}
